﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace GiMessCommons
{
    public enum NetServices
    {
        Blank = 1,
        Auth,
        SignOut,
        LoginAccepted,
        LoginFailed,

        SendMessage,
        TypeNotify,

        ListRequest,
        ListSend,
        ListGroupsSend,

        CreateAccount,
        CreateAccFaied,
        CreateAccSucces,

        UpdateStatus,
        UpdateAvatar,
        UpdateOnline,

        ContactDelete,
        ContactMove,
        ContactAdd,

        GroupCreate,
        GroupRename,
        
        AddRequest,
        AddRequestResponse,
        ErrorMessage
    }

    public static class NetConsants
    {
        private const string fieldsDelim        = "ÀÛ";//"À€";
        private const string fieldsDelimReplace = "&#192;&#219";//"&#192;&#8364;";
        private const string packetHeader       = "GMSG";
        private const int    port               =  1300;
        private const string ip                 = "127.0.0.1";

        //private static string fieldsDelim     = Encoding.UTF8.GetString(new byte[] {192, 219});

        //private static string stringEncoder = "ASCII";

        public static string PacketHeader
        {
            get { return packetHeader; }
        }

        public static string FieldsDelimiter
        {
            get { return fieldsDelim; }
        }

        public static string FieldsDelimiterReplace
        {
            get { return fieldsDelimReplace; }
        }

        public static int ConnectionPort
        {
            get { return port; }
        }

        public static string ConnectionIP
        {
            get { return ip; }
        }

        //public static string StringEncoder
        //{
        //    get { return stringEncoder; }
        //}
    }

}
